<template>
    <div class="content">
        <ul>
            <li>无序列表1</li>
            <li>无序列表2</li>
            <li>无序列表3</li>
            <li>无序列表4</li>
            <li>无序列表5</li>
        </ul>
    </div>
</template>

<script setup lang="ts">

</script>

<style lang="less" scoped>

.content{
    ul{
        li{
            background-color: red;
            &:nth-child(2n){
                background-color: green;
            }
        }
    }
}
</style>